package cn.bdqn.util;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Created by Administrator on 2018/8/17.
 */

@Configuration// 写了applicationContext-mybatis.xml
@ComponentScan(basePackages="cn.kgc.cn.bdqn.controller") // <context-ComponentScan basepackage="xxx.xx.x.xx">
@EnableSwagger2//启动swaggerapi生成
public class SwaggerConfig {
    @Bean// <bean id="apiGen" class="Docket"/>
    public Docket apiGen(){
        Docket docket =new Docket(DocumentationType.SWAGGER_2);
        docket.apiInfo(new ApiInfo("这是标题2","这是项目描述","这是版本","这是网址","开发者","许可说明 ","说明的地址"));
        return docket;

    }
}